package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 分类表，也可用作数据字典。表示一个全集，比如：男、女、未知。关联的分类类型表示按什么进行的分类，如：按照性别对人类对象集
 * @TableName category
 */
@TableName(value ="category")
@Data
public class Category implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 分类名称或描述
     */
    private String name;

    /**
     * 分类标识
     */
    private String dtcode;

    /**
     * 通常与分类标识一致，但万一有不一样的情况呢？
     */
    private String dtvalue;

    /**
     * 
     */
    private Integer enable;

    /**
     * 排序号
     */
    private Integer sortno;

    /**
     * 
     */
    private String description;

    /**
     * 
     */
    private String typeid;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 创建人ID
     */
    private String createuserid;

    /**
     * 创建人
     */
    private String createusername;

    /**
     * 最后更新时间
     */
    private Date updatetime;

    /**
     * 最后更新人ID
     */
    private String updateuserid;

    /**
     * 最后更新人
     */
    private String updateusername;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Category other = (Category) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDtcode() == null ? other.getDtcode() == null : this.getDtcode().equals(other.getDtcode()))
            && (this.getDtvalue() == null ? other.getDtvalue() == null : this.getDtvalue().equals(other.getDtvalue()))
            && (this.getEnable() == null ? other.getEnable() == null : this.getEnable().equals(other.getEnable()))
            && (this.getSortno() == null ? other.getSortno() == null : this.getSortno().equals(other.getSortno()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getTypeid() == null ? other.getTypeid() == null : this.getTypeid().equals(other.getTypeid()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getCreateuserid() == null ? other.getCreateuserid() == null : this.getCreateuserid().equals(other.getCreateuserid()))
            && (this.getCreateusername() == null ? other.getCreateusername() == null : this.getCreateusername().equals(other.getCreateusername()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getUpdateuserid() == null ? other.getUpdateuserid() == null : this.getUpdateuserid().equals(other.getUpdateuserid()))
            && (this.getUpdateusername() == null ? other.getUpdateusername() == null : this.getUpdateusername().equals(other.getUpdateusername()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDtcode() == null) ? 0 : getDtcode().hashCode());
        result = prime * result + ((getDtvalue() == null) ? 0 : getDtvalue().hashCode());
        result = prime * result + ((getEnable() == null) ? 0 : getEnable().hashCode());
        result = prime * result + ((getSortno() == null) ? 0 : getSortno().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getTypeid() == null) ? 0 : getTypeid().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getCreateuserid() == null) ? 0 : getCreateuserid().hashCode());
        result = prime * result + ((getCreateusername() == null) ? 0 : getCreateusername().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getUpdateuserid() == null) ? 0 : getUpdateuserid().hashCode());
        result = prime * result + ((getUpdateusername() == null) ? 0 : getUpdateusername().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", dtcode=").append(dtcode);
        sb.append(", dtvalue=").append(dtvalue);
        sb.append(", enable=").append(enable);
        sb.append(", sortno=").append(sortno);
        sb.append(", description=").append(description);
        sb.append(", typeid=").append(typeid);
        sb.append(", createtime=").append(createtime);
        sb.append(", createuserid=").append(createuserid);
        sb.append(", createusername=").append(createusername);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", updateuserid=").append(updateuserid);
        sb.append(", updateusername=").append(updateusername);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}